<?php
header("content-type:text/html;charset=utf8");
$id= $_GET['id'];
//print_r($id);die;
$pdo = new PDO("mysql:host=127.0.0.1;dbname=11-9;charset=utf8",'root','root');
$sql = "select * from excel where id = '$id'";
//print_r($sql);die;
$res = $pdo->query($sql);
//print_r($res);die;
$data = $res->fetch();
//print_r($data);die;
?>

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Document</title>
</head>
<body>
<form action="sven_do.php" method="post">
    <input type="hidden" name="id" value="<?php echo $data['id']?>">
    <table>
        <tr>
            <td>课程名称</td>
            <td><input type="text" name="name" value="<?php echo $data['name']?>"></td>
        </tr>
        <tr>
            <td>课程时间</td>
            <td><input type="text" name="time" value="<?php echo $data['time']?>"></td>
        </tr>
        <tr>
            <td>课程数量</td>
            <td><input type="text" name="num" value="<?php echo $data['num']?>"></td>
        </tr>
        <tr>
            <td>课程教室</td>
            <td><input type="text" name="class" value="<?php echo $data['class']?>"></td>
        </tr>
        <tr>
            <td><input type="submit" value="修改"></td>
        </tr>
    </table>
</form>
</body>
</html>
